package com.ymttest.business.service;

import java.io.IOException;
import java.util.Map;

import org.apache.http.client.ClientProtocolException;

import com.ymatou.iapi.mqcompensate.parameter.CheckToChompensateBean;
import com.ymatou.iapi.mqcompensate.parameter.StartBean;
import com.ymatou.iapi.mqcompensate.parameter.StopBean;
import com.ymatou.iapi.mqcompensate.service.CheckToChompensateCall;
import com.ymatou.iapi.mqcompensate.service.StartCall;
import com.ymatou.iapi.mqcompensate.service.StopCall;

public class MqCompensateCallService {
	
	public static void StartMqCompensate() throws ClientProtocolException, IOException {
		StartBean startBean=new StartBean();
		StartCall startCall = new StartCall();
		
		startCall.setData(startBean);
		startCall.callService();		
	}
	
	public static void StopMqCompensate() throws ClientProtocolException, IOException {
		StopBean stopBean=new StopBean();
		StopCall stopCall = new StopCall();
		
		stopCall.setData(stopBean);
		stopCall.callService();		
	}
	
	public static CheckToChompensateCall CheckToChompensateCall(String appName, String codeName) throws ClientProtocolException, IOException
	{
		CheckToChompensateBean checktochompensateBean = new CheckToChompensateBean();
		CheckToChompensateCall checktochompensateCall = new CheckToChompensateCall();
		
		checktochompensateBean.setAppId(appName);
		checktochompensateBean.setCode(codeName);
		
		checktochompensateCall.setData(checktochompensateBean);
		checktochompensateCall.callService();	
		
		return checktochompensateCall;
	}
}
